<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html>
<html>
<head>
<title> left </title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${ctxpath}/common/css/style_frame.css" type="text/css" />
<link rel="stylesheet" href="${ctxpath}/common/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="${ctxpath}/common/js/jquery/jquery.js"></script>
<script type="text/javascript" src="${ctxpath}/common/js/jquery/ztree/jquery.ztree.core.min.js"></script>
<SCRIPT type="text/javascript">
    <!--
    var setting = {
        data: {
            key: {
                title:"t"
            },
            simpleData: {
                enable: true
            }
        },
        callback: {
            beforeClick: beforeClick,
            onClick: onClick
        }
    };
    var zNodes =[
        {id:"100A",pId:"",name:"测试",pageLink:""},
        {id:"100AA",pId:"100A",name:"方法测试",pageLink:"sample/beantest/BeanTest.jsp"},
        {id:"100AB",pId:"100A",name:"AjaxJson",pageLink:"sample/ajaxjson/AjaxJson.jsp"},
        {id:"100AC",pId:"100A",name:"系统信息",pageLink:"sample/monitor.jsp"},
        {id:"100AD",pId:"100A",name:"文件上传",pageLink:"sample/fileupload/FileUploadMain.jsp"},
        {id:"100AE",pId:"100A",name:"时间组件",pageLink:"sample/datetime/DateMain.jsp"},
        {id:"100AF",pId:"100A",name:"文本编辑器",pageLink:"sample/editor/EditorMain.jsp"},
        {id:"100AG",pId:"100A",name:"显示隐藏",pageLink:"sample/display/hidden.jsp"},
        {id:"100AH",pId:"100A",name:"邮件发送",pageLink:"sample/mail/SendMail.jsp"},
        {id:"100AI",pId:"100A",name:"数据库",pageLink:"sample/db/DBManagerMain.jsp"},
        {id:"100AJ",pId:"100A",name:"数据库事务",pageLink:"sample/transaction/transaction.jsp"},
        {id:"100AK",pId:"100A",name:"分页排序",pageLink:"sample/tablist/TablistMain.jsp"},
        {id:"100AL",pId:"100A",name:"分页排序Oracle",pageLink:"sample/tablist/TabOracleMain.jsp"},
        {id:"100AM",pId:"100A",name:"代码生成",pageLink:"sample/code/CodeGen.jsp"},
        {id:"100AN",pId:"100A",name:"缓存管理",pageLink:"admin/dict/DictMain.jsp"},
        {id:"100AO",pId:"100A",name:"Frame页面",pageLink:"sample/PageFrameMain.jsp"},
        {id:"100AP",pId:"100A",name:"Iframe页面",pageLink:"sample/PageIframeMain.jsp"},
        {id:"100AQ",pId:"100A",name:"测试",pageLink:"sample/test/TestMain.jsp"}
    ];

    function beforeClick(treeId, treeNode, clickFlag) {
    }
    function onClick(event, treeId, treeNode, clickFlag) {
//            parent.workframe.document.getElementById("add_tab").click();
        if(treeNode.pageLink!=""){
            var pageUrl="${ctxpath}/"+treeNode.pageLink;
            parent.workframe.addNewTab(treeNode.id,treeNode.name,pageUrl);
        }
    }
    $(document).ready(function(){
        $.fn.zTree.init($("#menuTree"), setting, zNodes);
    });
    //-->
</SCRIPT>
</head>
<body style="background-color: #f3f9fa">
<div class="content_wrap">
    <div class="zTreeDemoBackground left">
        <ul id="menuTree" class="ztree"></ul>
    </div>
</div>
</body>
</html>